package fr.univsavoie.tatiana2dvisualisation;

public class EyeTrackerEvent {
	public final EyeTrackerReplayableEvent prev;
	public final EyeTrackerReplayableEvent current;
	public final int timetype;
	public final DrawCondition condition;
	
	public EyeTrackerEvent(EyeTrackerReplayableEvent prev, EyeTrackerReplayableEvent current, int timetype, DrawCondition condition) {
		super();
		this.prev = prev;
		this.current = current;
		this.timetype = timetype;
		this.condition = condition;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((condition == null) ? 0 : condition.hashCode());
		result = prime * result + ((current == null) ? 0 : current.hashCode());
		result = prime * result + ((prev == null) ? 0 : prev.hashCode());
		result = prime * result + timetype;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final EyeTrackerEvent other = (EyeTrackerEvent) obj;
		if (condition == null) {
			if (other.condition != null)
				return false;
		} else if (!condition.equals(other.condition))
			return false;
		if (current == null) {
			if (other.current != null)
				return false;
		} else if (!current.equals(other.current))
			return false;
		if (prev == null) {
			if (other.prev != null)
				return false;
		} else if (!prev.equals(other.prev))
			return false;
		if (timetype != other.timetype)
			return false;
		return true;
	}
	
	
	
}
